home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1998 #4
/
Amiga Plus CD - 1998 - No. 4.iso
/
pd
/
tools
/
happydt
/
install
/
install_script
< prev
next >
Wrap
Text File
|
1997-10-26
|
9KB
|
333 lines
; $VER: Install HappyDT 2.2 (06.22.97)
;
; Installer script for HappyDT.
;
(set UserLevel.old @user-level)
; Initialize messages.
(set #WrongKickStart "\nYou must be using at least KickStart 3.0 to run HappyDT.")
(set #WhichLanguage "\nWhich languages should be installed ? (English built-in)\n")
(set #WhichDoc "\nWhich documentations should be installed ?\n")
(set #ChoiceCpu "\nWhich version of HappyDT should be installed ?\n")
(set #ChoiceIcon "\nWhich icon type should be installed ?\n")
(set #SelDCom "\nSelect the drawer where you want the HappyDT program will be install.\n")
(set #SelDPre "\nSelect the drawer where you want the preference program will be install\n")
(set #SelBDoc "\nDo you wish to install the HappyDT documentation ?")
(set #SelDDoc "\nSelect the drawer where you want the HappyDT documentation will be install.\n")
(if (= @language "français")
(
(set #WrongKickStart "\nVous devez utilisez au moins le KickStart 3.0\n pour utiliser HappyDT.")
(set #WhichLanguage "\nQuelles languages doivent être installé ? (Englais en interne)\n")
(set #WhichDoc "\nQuelles documentations doivent être installé ?\n")
(set #ChoiceCpu "\nQuelle version de HappyDT doit être installé ?\n")
(set #ChoiceIcon "\nQuelle type d'icône doit être installé ?\n")
(set #SelDCom "\nChoisissez le répertoire où vous voulez installer HappyDT.\n")
(set #SelDPre "\nChoisissez le répertoire où vous voulez installer le programme de préférence\n")
(set #SelBDoc "\nVoulez-vous installer la documentation de HappyDT ?")
(set #SelDDoc "\nChoisissez le repertoire où vous voulez installer la documentation de HappyDT.\n")
))
(if (= @language "español")
(
(set #WrongKickStart "\nNecesita disponer Kickstart 3.0 o superior para ejecutar HappyDT.")
(set #WhichLanguage "\n¿Qué idiomas desea instalar (el inglés es interno)?\n")
(set #WhichDoc "\n¿Qué ficheros de documentación desea instalar?\n")
(set #ChoiceCpu "\n¿Qué versión de HappyDT desea instalar?\n")
(set #ChoiceIcon "\n¿Qué tipo de iconos desea instalar?\n")
(set #SelDCom "\nElija el cajón donde desea instalar el programa HappyDT.\n")
(set #SelDPre "\nElija el cajón donde desea instalar el programa de preferencias.\n")
(set #SelBDoc "\n¿Desea instalar la documentación de HappyDT?")
(set #SelDDoc "\nElija el cajón donde desea instalar la documentación de HappyDT.\n")
))
(if (= @language "italiano")
(
(set #WrongKickStart "\nHappyDT richiede WorkBench 3.0 o superiore!")
(set #WhichLanguage "\nQuale linguaggi vuoi che siano installati ? (Inglese incluso nel programma stesso)\n")
(set #WhichDoc "\nChe documentazione vuoi che sia installata ?\n")
(set #ChoiceCpu "\nChe versione di HappyDT vuoi che sia installata?\n")
(set #ChoiceIcon "\nChe tipo di icone vuoi che siano installate ?\n")
(set #SelDCom "\nSeleziona il cassetto in cui vuoi installare HappyDT.\n")
(set #SelDPre "\nSeleziona il cassetto in cui vuoi installare il programma preferenze di HappyDT.\n")
(set #SelBDoc "\nVuoi installare la documentazione di HappyDT ?")
(set #SelDDoc "\nSeleziona il cassetto in cui vuoi che sia installata la documentazione di HappyDT.\n")
))
(procedure InstallLanguages
(
(set n 0)
(while (set language (select n "français" "english" "español" "deutsch" "italiano" ""))
(
(if (in SelectedLanguages n)
(
(if (<> 1 n)
(
(makedir (cat "SYS:Locale/Catalogs/" language))
(copyfiles (source (cat "/Locale/Catalogs/" language))
(dest (cat "SYS:Locale/Catalogs/" language))
(all))
))
))
(set n (+ n 1))
))
))
(procedure InstallDocs
(
(set n 0)
(while (set doc (select n "HappyDT_Français.guide" "HappyDT_English.guide" "HappyDT_Español.guide" "HappyDT_Deutsch.guide" "HappyDT_Italiano" ""))
(
(if (in SelectedDocs n)
(
(if (<> 3 n)
(
(copyfiles (source DOCSource)
(dest DOCDest)
(pattern doc))
))
(if (= SelectedIcon 0)
( (copyfiles (source (tackon DOCSource "icons/std_icon.info"))
(dest DOCDest)
(newname (cat doc ".info"))
)
))
(if (= SelectedIcon 1)
( (copyfiles (source (tackon DOCSource "icons/magicwb_icon.info"))
(dest DOCDest)
(newname (cat doc ".info"))
)
))
(if (= SelectedIcon 2)
( (copyfiles (source (tackon DOCSource "icons/newicon_icon.info"))
(dest DOCDest)
(newname (cat doc ".info"))
)
))
))
(set n (+ n 1))
))
))
(procedure InstallCom
(
(if (= SelectedCpu 0)
(
(copyfiles (source (tackon COMSource "00"))
(dest COMDest)
(all))
))
(if (= SelectedCpu 1)
(
(copyfiles (source (tackon COMSource "20"))
(dest COMDest)
(all))
))
))
(procedure InstallIcon
(
(if (= SelectedIcon 0)
( (copyfiles (source (tackon PRESource "icons/std_icon.info"))
(dest PREDest)
(newname ICONName)
)
(copyfiles (source (tackon COMSource "icons/std_icon.info"))
(dest COMDest)
(newname "HappyDT.info")
)
))
(if (= SelectedIcon 1)
( (copyfiles (source (tackon PRESource "icons/magicwb_icon.info"))
(dest PREDest)
(newname ICONName)
)
(copyfiles (source (tackon COMSource "icons/magicwb_icon.info"))
(dest COMDest)
(newname "HappyDT.info")
)
))
(if (= SelectedIcon 2)
( (copyfiles (source (tackon PRESource "icons/newicon_icon.info"))
(dest PREDest)
(newname ICONName)
)
(copyfiles (source (tackon COMSource "icons/newicon_icon.info"))
(dest COMDest)
(newname "HappyDT.info")
)
))
))
(procedure InstallPrefs
(
(if (= SelectedCpu 0)
(
(if (= PREDest COMDest)
(copyfiles (source (tackon PRESource "00/HappyDT"))
(dest PREDest)
(newname "HappyDT_Prefs")
)
(copyfiles (source (tackon PRESource "00"))
(dest PREDest)
(all)))
))
(if (= SelectedCpu 1)
(
(if (= PREDest COMDest)
(copyfiles (source (tackon PRESource "20/HappyDT"))
(dest PREDest)
(newname "HappyDT_Prefs")
)
(copyfiles (source (tackon PRESource "20"))
(dest PREDest)
(all)))
))
))
; Welcome the user.
(complete 0)
(welcome)
; Make sure we are running under KickStart 3.0
(if (< (/ (getversion) 65536) 39)
(abort #WrongKickStart)
)
; Prepare Install
(set COMSource "/exe/")
; Commodity dest.
(set COMDest
(tackon
(askdir
(prompt #SelDCom)
(help @askdir-help)
(default "Sys:WBStartup")
)
""
)
)
(set PRESource "/prefs/")
; Preference dest.
(set PREDest
(tackon
(askdir
(prompt #SelDPre)
(help @askdir-help)
(default "Sys:Prefs")
)
""
)
)
; Cpu choice.
(set SelectedCpu
(askchoice
(help @askchoice-help)
(prompt #ChoiceCpu)
(choices "68000"
"68020+")
(default (if (= "68000" (database "cpu")) 0 1))
))
; Icon choice.
(set SelectedIcon
(askchoice
(help @askchoice-help)
(prompt #ChoiceIcon)
(choices "Standard"
"MagicWb" "NewIcon")
))
; Install doc ?
(set docbool
(askbool
(prompt #SelBDoc)
(help @askbool_help)
(default 1)
))
; where ?
(set DOCSource "/docs/")
(if docbool
(set DOCDest
(tackon
(askdir
(prompt #SelDDoc)
(help @askdir-help)
(default "help:")
)
""
)
))
; choice of docs to install
(if docbool
(set SelectedDocs
(askoptions
(prompt #WhichDoc)
(help @askdir-help)
(choices "français"
"english" "español" "deutsch" "italiano")
(default (if (= @language "français") 1 (if (= @language "deutsch") 8 (if (= @language "español") 4 (if (= @language "italiano")16 2)))))
)))
; Choice of language catalogs
(if (exists "SYS:Locale/Catalogs")
(
(user 1)
(set SelectedLanguages
(askoptions
(prompt #WhichLanguage)
(help @askoptions-help)
(choices "français"
"english" "español" "deutsch" "italiano")
(default (if (= @language "français") 1 (if (= @language "deutsch") 8 (if (= @language "español") 4 (if (= @language "italiano")16 2 )))))
))
(user UserLevel.old)
))
; Install all
(InstallCom)
(complete 25)
(if (= COMDest PREDest) (set ICONName "HappyDT_Prefs.info")
(set ICONName "HappyDT.info"))
(InstallPrefs)
(complete 50)
(InstallIcon)
(if docbool (InstallDocs))
(complete 75)
(InstallLanguages)
(complete 100)
; exit
(set @default-dest "")
(exit)